#pragma once

#include <ranges>
#include <vector>
#include <iostream>

namespace ranges_test
{
	void Test()
	{
		using std::views::filter, std::views::transform, std::views::reverse;

		std::vector<int> numbers = { 6,5,4,3,2,1 };
		auto is_even = [](int n) {return n % 2 == 0; };

		auto results = numbers | filter(is_even)
			| transform([](int n) {return n + 1; })
			| reverse;

		for (auto v : results)
		{
			std::cout << v << " ";
		}
	}
}